'''
Created on Apr 23, 2012

@author: root
'''
from Base import Base
import threading
import Queue
import yum
import tarfile
import os
from Project import Project
from Role import Role
from Module import Module

class Pig(Base):

    remoteInstallPath = "/tmp/pachyderm"
    binDir = ""
    binName = ""

    def __init__(self,Nodes,Users,binPath):
        self.Users = Users
        self.Nodes = Nodes
        Base.__init__(self)
        self.SetUsers(self.Users)
        self.binPath = binPath
        
        ''' Take the entry from the -g entry and parse the components '''
        
        binComponents = self.binPath[1:].split('/')
        self.binName = binComponents[len(binComponents)-1]
        binComponents.remove(self.binName)
        for comp in (binComponents):
            self.binDir = self.binDir + "/" + comp
        print "    * Starting Hadoop: Pig Install"

        
#        self.binDir = binDir
#        self.binName = binName

        